package com.youlai.boot.system.controller;

import com.youlai.boot.system.service.ExportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/export")
public class ExportController {

    @Autowired
    private ExportService exportService;



    @GetMapping("/export")
    public ResponseEntity<byte[]> export(@RequestParam String format) {
        return exportService.exportDocument(format);
    }
}
